<template>

  <section class="addraess-header">
		
    <div class="header">
			<img src="../assets/main_img/left.png" @click="back()" />
			<h1>{{title}}</h1>
		</div>
  </section>

</template>

<script>

  export default  {
    name: 'addraess-header',
    mounted() {

    },
    data() {
      return {
				// name:this.title
      }
		},
		props:['title'],
    methods: {
			back() {
				console.log(this.title)
				if(this.title != "确认订单"){
					this.$router.back(-1)
					
				}
				this.$router.push({
						path: '/ShopCar'
					})
				console.log(window.history)
				// if(window.history.length > 1) {
				// 	console.log(1)
				// 	// this.$router.push({
				// 	// 	path: '/ConfirmOrder'
				// 	// })

				// 	return false
				// } else {
				// 	console.log(1)
				// 	this.$router.go(-1)
				// }   
				// setTimeout(() => {
				// 	this.$router.push({
				// 		path: '/'
				// 	})
				// }, 0)
			}
    },
    computed: {

    }
}
</script>

<style scoped>
  .header {
		width: 100%;
		height: 1rem;
		border-bottom: 0.01rem solid #dedee0;
		overflow: hidden;
	}
	
	.header h1 {
		font-size: 0.35rem;
		text-align: center;
		padding-top: 0.25rem;
		margin-right: 0.5rem;
		color: #294072;
	}
	
	.header img {
		width: 0.7rem;
		height: 0.8rem;
		margin: 0.15rem 0 0 0.11rem;
		float: left;
	}
</style>
